<template>
    <div class="reportFormPage" v-if="show">
        <div class="report-dom">
            <el-row>
                <el-col :span="5" :offset="19">
                    <div class="pageNumBox">
                        <span>第</span>
                        <span class="placeholder-min text-center">&nbsp;{{ form.page }}&nbsp;</span>
                        <span>页，共</span>
                        <span class="placeholder-min text-center">&nbsp;{{ form.totalPage }}&nbsp;</span>
                        <span>页</span>
                    </div>
                </el-col>
            </el-row>
            <div class="topTwoBox">
                <div class="centerName">{{ this.form.baobmc }}</div>
                <div class="codeText">
                    <tr v-for="(item, index) in form.baobbhList">{{ item }}</tr>
                </div>
            </div>
            <div class="threeTopBox">
                <div class="left-border">
                    <div class="box-title">检测单位名称：</div>
                    <div class>{{ form.jiancdwmc }}</div>
                </div>
                <div class="right-border">
                    <span>记录编号：</span>
                    <span class="placeholder">{{ form.jilbh }}</span>
                </div>
            </div>
            <!-- .........................1111111111111111111111111111111......................................................... -->
            <div class="table-border">
                <table height="190px" class="top-table">
                    <tbody>
                    <tr>
                        <td height="30" align="center" width="15%">
                            <span style="width: 90px; display: inline-block">工程名称</span>
                        </td>
                        <td width="35%" class="text-center">
                            <span>{{ form.gongcmc }}</span>
                        </td>
                        <td align="center" width="15%">
                            <span style="width: 90px; display: inline-block">工程部位/用途</span>
                        </td>
                        <td width="35%" class="text-center">
                            <span>{{ form.gongcbwyt }}</span>
                        </td>
                    </tr>
                    <tr>
                        <td height="40" align="center">样品信息</td>
                        <td class="specimen-border" colspan="3">
                            <span>样品名称：</span>
                            <span :class="{ 'placeholder': !form.yangpmc }">{{ form.yangpmc }}</span>
                            <span>；样品编号：</span>
                            <span :class="{ 'placeholder-long': !form.yangpbh }">{{ form.yangpbh }}</span>
                            <span>；样品数量：</span>
                            <span :class="{ 'placeholder': !form.yangpsl }">{{ form.yangpsl }}</span>
                            <span>；样品状态：</span>
                            <span :class="{ 'placeholder': !form.yangpzt }">{{ form.yangpzt }}</span>
                            <span>；来样时间：</span>
                            <span :class="{ 'placeholder': !form.yangpsj }">{{ form.yangpsj }}</span>
                        </td>
                    </tr>

                    <tr>
                        <td height="25" align="center" width="15%">
                            <span style="width: 90px; display: inline-block">试验检测日期</span>
                        </td>
                         <!-- <td width="35%" class="text-center">{{ form.shiyjcrq }}</td> -->                                            
 <td width="35%" class="text-center">
      <el-input v-model="form.shiyjcrq" />
</td>
                        <td align="center" width="15%">
                            <span style="width: 90px; display: inline-block">试验条件</span>
                        </td>
                        <td v-if="isPdf" width="35%">
                            温度：
                            <span style="display: inline-block; width: 10%;">{{ form.shiytjwd }}</span>
                            ℃；湿度：
                            <span style="display: inline-block; width: 10%;">{{ form.shiytjsd }}</span>%RH
                        </td>
                        <td v-else width="35%">
                            温度：
                            <el-input :type="isPdf ? 'string' : 'number'" v-model="form.shiytjwd" style="width: 15%"/>
                            ℃；湿度：
                            <el-input :type="isPdf ? 'string' : 'number'" v-model="form.shiytjsd" style="width: 15%"/>
                            %RH
                        </td>
                    </tr>

                    <tr>
                        <td height="40" align="center" width="15%">
                            <span style="width: 90px; display: inline-block">检测依据</span>
                        </td>
                        <td width="35%">
                            <span v-if="isPdf">{{ form.jiancyj }}</span>
                            <el-input v-else type="textarea" v-model="form.jiancyj" :rows="2" class="mark"
                                      @dblclick.native="showBsJiancyjView" readonly/>
                        </td>
                        <td align="center" width="15%">
                            <span style="width: 90px; display: inline-block">判定依据</span>
                        </td>
                        <td width="35%">
                            <span v-if="isPdf">{{ form.pandyj }}</span>
                            <el-input v-else type="textarea" v-model="form.pandyj" :rows="2"
                                      @dblclick.native="showBsJudgeBaseView"
                                      @focus="handleFocus('pandyj')" class="mark"/>
                        </td>
                    </tr>
                    <tr class="bottom-border">
                        <td height="40" align="center">
                            <div>主要仪器设备</div>
                            <div>名称及编号</div>
                        </td>
                        <td colspan="3">
                            <span v-if="isPdf">{{ form.zhuyyqsbmcjbh }}</span>
                            <el-input v-else type="textarea" :rows="2" v-model="form.zhuyyqsbmcjbh"
                                      class="height100 width100 mark"
                                      @dblclick.native="showBsInstrumentView" readonly></el-input>
                        </td>
                    </tr>
                    </tbody>
                </table>
                <!-- .................................222222222221111111111111111111111............................................... -->
                <table height="60px" class="middle-table">
                    <tbody>
                    <tr>
                        <td height="30" align="center" width="15%">取样地点</td>
                        <td width="35%">
                            <span>{{ this.form.quydd }}</span>
                        </td>
                        <td height="30" align="center" width="15%">代表数量</td>
                        <td width="35%">
                            <span>{{ this.form.daibsl }}</span>
                        </td>
                    </tr>
                    <tr>
                        <td align="center" height="30">进场日期</td>
                        <td bgcolor="white">
                            <span>{{ this.form.jincrq }}</span>
                        </td>
                        <td align="center" height="30">产地</td>
                        <td bgcolor="white">
                            <span>{{ this.form.cd }}</span>
                        </td>
                    </tr>
                    </tbody>
                </table>
                <!-- .................................22222222222222222222222222222222............................................... -->
                <table height="530px" class="middle-table">
                    <tbody>
                    <tr trindex="0">
                        <td width="5%" rowspan="10">
                            <div>针</br>片</br>状</br>颗</br>粒</br>含</br>量</div>
                        </td>
                        <td width="15%" colspan="2">
                            <div>类别</div>
                        </td>
                        <td width="5%">
                            <div>试验次数</div>
                        </td>
                        <td width="20%" colspan="2">
                            <div>试验用集料质量(g)</div>
                        </td>
                        <td width="20%" colspan="2">
                            <div>针片状颗粒质量(g)</div>
                        </td>
                        <td width="20%" colspan="2">
                            <div>针片状颗粒含量(%)</div>
                        </td>
                        <td width="15%">平均值(%)</td>
                    </tr>
                    <tr trindex="1">
                        <td width="15%" colspan="2" rowspan="3">
                            <div>混合料</div>
                        </td>
                        <td width="5%">
                            <div>{{ this.form.zhenpzklhlhhlsycsItem1 }}</div>
                        </td>
                        <td width="20%" colspan="2">
                            <el-input :type="isPdf ? 'string' : 'number'" tabindex="200"
                                      v-model="form.zhenpzklhlhhlsyyjlzlItem1"
                                      @change="computeZpzHhl(1)"
                                      @keydown.native="handleKeyDown($event, 0, 0)"
                                      @paste.native="handlePaste($event, 0, 0)"
                                      :ref="'0_0'"/>
                        </td>
                        <td width="20%" colspan="2">
                            <el-input :type="isPdf ? 'string' : 'number'" tabindex="200"
                                      v-model="form.zhenpzklhlhhlsyzpzklzlItem1"
                                      @change="computeZpzHhl(1)"
                                      @keydown.native="handleKeyDown($event, 0, 1)"
                                      @paste.native="handlePaste($event, 0, 1)"
                                      :ref="'0_1'"/>
                        </td>
                        <td width="20%" colspan="2">
                            <div>{{ this.form.zhenpzklhlhhlsyzpzklhlItem1 }}</div>
                        </td>
                        <td width="10%" rowspan="3">
                            <div>{{ this.form.zhenpzklhlhhlsyPjz }}</div>
                        </td>
                    </tr>
                    <tr trindex="2">
                        <td width="5%">
                            <div>{{ this.form.zhenpzklhlhhlsycsItem2 }}</div>
                        </td>
                        <td width="20%" colspan="2">
                            <el-input :type="isPdf ? 'string' : 'number'" tabindex="200"
                                      v-model="form.zhenpzklhlhhlsyyjlzlItem2"
                                      @change="computeZpzHhl(2)"
                                      @keydown.native="handleKeyDown($event, 1, 0)"
                                      @paste.native="handlePaste($event, 1, 0)"
                                      :ref="'1_0'"/>
                        </td>
                        <td width="20%" colspan="2">
                            <el-input :type="isPdf ? 'string' : 'number'" tabindex="200"
                                      v-model="form.zhenpzklhlhhlsyzpzklzlItem2"
                                      @change="computeZpzHhl(2)"
                                      @keydown.native="handleKeyDown($event, 1, 1)"
                                      @paste.native="handlePaste($event, 1, 1)"
                                      :ref="'1_1'"/>
                        </td>
                        <td width="20%" colspan="2">
                            <div>{{ this.form.zhenpzklhlhhlsyzpzklhlItem2 }}</div>
                        </td>
                    </tr>
                    <tr trindex="3">
                        <td width="5%">
                            <div>{{ this.form.zhenpzklhlhhlsycsItem3 }}</div>
                        </td>
                        <td width="20%" colspan="2">
                            <el-input :type="isPdf ? 'string' : 'number'" tabindex="200"
                                      v-model="form.zhenpzklhlhhlsyyjlzlItem3"
                                      @change="computeZpzHhl(3)"
                                      @keydown.native="handleKeyDown($event, 2, 0)"
                                      @paste.native="handlePaste($event, 2, 0)"
                                      :ref="'2_0'"/>
                        </td>
                        <td width="20%" colspan="2">
                            <el-input :type="isPdf ? 'string' : 'number'" tabindex="200"
                                      v-model="form.zhenpzklhlhhlsyzpzklzlItem3"
                                      @change="computeZpzHhl(3)"
                                      @keydown.native="handleKeyDown($event, 2, 1)"
                                      @paste.native="handlePaste($event, 2, 1)"
                                      :ref="'2_1'"/>
                        </td>
                        <td width="20%" colspan="2">
                            <div>{{ this.form.zhenpzklhlhhlsyzpzklhlItem3 }}</div>
                        </td>
                    </tr>
                    <tr trindex="4">
                        <td width="15%" colspan="2" rowspan="3">
                            <div>粒径大于9.5mm</div>
                        </td>
                        <td width="5%">
                            <div>{{ this.form.zhenpzklhlljdy95sycsItem1 }}</div>
                        </td>
                        <td width="20%" colspan="2">
                            <el-input :type="isPdf ? 'string' : 'number'" tabindex="200"
                                      v-model="form.zhenpzklhlljdy95syyjlzlItem1"
                                      @change="computeZpzDy95mm(1)"
                                      @keydown.native="handleKeyDown($event, 3, 0)"
                                      @paste.native="handlePaste($event, 3, 0)"
                                      :ref="'3_0'"/>
                        </td>
                        <td width="20%" colspan="2">
                            <el-input :type="isPdf ? 'string' : 'number'" tabindex="200"
                                      v-model="form.zhenpzklhlljdy95syzpzklzlItem1"
                                      @change="computeZpzDy95mm(1)"
                                      @keydown.native="handleKeyDown($event, 3, 1)"
                                      @paste.native="handlePaste($event, 3, 1)"
                                      :ref="'3_1'"/>
                        </td>
                        <td width="20%" colspan="2">
                            <div>{{ this.form.zhenpzklhlljdy95syzpzklhlItem1 }}</div>
                        </td>
                        <td width="10%" rowspan="3">
                            <div>{{ this.form.zhenpzklhlljdy95syPjz }}</div>
                        </td>
                    </tr>
                    <tr trindex="5">
                        <td width="5%">
                            <div>{{ this.form.zhenpzklhlljdy95sycsItem2 }}</div>
                        </td>
                        <td width="20%" colspan="2">
                            <el-input :type="isPdf ? 'string' : 'number'" tabindex="200"
                                      v-model="form.zhenpzklhlljdy95syyjlzlItem2"
                                      @change="computeZpzDy95mm(2)"
                                      @keydown.native="handleKeyDown($event, 4, 0)"
                                      @paste.native="handlePaste($event, 4, 0)"
                                      :ref="'4_0'"/>
                        </td>
                        <td width="20%" colspan="2">
                            <el-input :type="isPdf ? 'string' : 'number'" tabindex="200"
                                      v-model="form.zhenpzklhlljdy95syzpzklzlItem2"
                                      @change="computeZpzDy95mm(2)"
                                      @keydown.native="handleKeyDown($event, 4, 1)"
                                      @paste.native="handlePaste($event, 4, 1)"
                                      :ref="'4_1'"/>
                        </td>
                        <td width="20%" colspan="2">
                            <div>{{ this.form.zhenpzklhlljdy95syzpzklhlItem2 }}</div>
                        </td>
                    </tr>
                    <tr trindex="6">
                        <td width="5%">
                            <div>{{ this.form.zhenpzklhlljdy95sycsItem3 }}</div>
                        </td>
                        <td width="20%" colspan="2">
                            <el-input :type="isPdf ? 'string' : 'number'" tabindex="200"
                                      v-model="form.zhenpzklhlljdy95syyjlzlItem3"
                                      @change="computeZpzDy95mm(3)"
                                      @keydown.native="handleKeyDown($event, 5, 0)"
                                      @paste.native="handlePaste($event, 5, 0)"
                                      :ref="'5_0'"/>
                        </td>
                        <td width="20%" colspan="2">
                            <el-input :type="isPdf ? 'string' : 'number'" tabindex="200"
                                      v-model="form.zhenpzklhlljdy95syzpzklzlItem3"
                                      @change="computeZpzDy95mm(3)"
                                      @keydown.native="handleKeyDown($event, 5, 1)"
                                      @paste.native="handlePaste($event, 5, 1)"
                                      :ref="'5_1'"/>
                        </td>
                        <td width="20%" colspan="2">
                            <div>{{ this.form.zhenpzklhlljdy95syzpzklhlItem3 }}</div>
                        </td>
                    </tr>
                    <tr trindex="7">
                        <td width="15%" colspan="2" rowspan="3">
                            <div>粒径小于9.5mm</div>
                        </td>
                        <td width="5%">
                            <div>{{ this.form.zhenpzklhlljxy95sycsItem1 }}</div>
                        </td>
                        <td width="20%" colspan="2">
                            <el-input :type="isPdf ? 'string' : 'number'" tabindex="200"
                                      v-model="form.zhenpzklhlljxy95syyjlzlItem1"
                                      @change="computeZpzXy95mm(1)"
                                      @keydown.native="handleKeyDown($event, 6, 0)"
                                      @paste.native="handlePaste($event, 6, 0)"
                                      :ref="'6_0'"/>
                        </td>
                        <td width="20%" colspan="2">
                            <el-input :type="isPdf ? 'string' : 'number'" tabindex="200"
                                      v-model="form.zhenpzklhlljxy95syzpzklzlItem1"
                                      @change="computeZpzXy95mm(1)"
                                      @keydown.native="handleKeyDown($event, 6, 1)"
                                      @paste.native="handlePaste($event, 6, 1)"
                                      :ref="'6_1'"/>
                        </td>
                        <td width="20%" colspan="2">
                            <div>{{ this.form.zhenpzklhlljxy95syzpzklhlItem1 }}</div>
                        </td>
                        <td width="10%" rowspan="3">
                            <div>{{ this.form.zhenpzklhlljxy95syzpzklhlPjz }}</div>
                        </td>
                    </tr>
                    <tr trindex="8">
                        <td width="5%">
                            <div>{{ this.form.zhenpzklhlljxy95sycsItem2 }}</div>
                        </td>
                        <td width="20%" colspan="2">
                            <el-input :type="isPdf ? 'string' : 'number'" tabindex="200"
                                      v-model="form.zhenpzklhlljxy95syyjlzlItem2"
                                      @change="computeZpzXy95mm(2)"
                                      @keydown.native="handleKeyDown($event, 7, 0)"
                                      @paste.native="handlePaste($event, 7, 0)"
                                      :ref="'7_0'"/>
                        </td>
                        <td width="20%" colspan="2">
                            <el-input :type="isPdf ? 'string' : 'number'" tabindex="200"
                                      v-model="form.zhenpzklhlljxy95syzpzklzlItem2"
                                      @change="computeZpzXy95mm(2)"
                                      @keydown.native="handleKeyDown($event, 7, 1)"
                                      @paste.native="handlePaste($event, 7, 1)"
                                      :ref="'7_1'"/>
                        </td>
                        <td width="20%" colspan="2">
                            <div>{{ this.form.zhenpzklhlljxy95syzpzklhlItem2 }}</div>
                        </td>
                    </tr>
                    <tr trindex="9">
                        <td width="5%">
                            <div>{{ this.form.zhenpzklhlljxy95sycsItem3 }}</div>
                        </td>
                        <td width="20%" colspan="2">
                            <el-input :type="isPdf ? 'string' : 'number'" tabindex="200"
                                      v-model="form.zhenpzklhlljxy95syyjlzlItem3"
                                      @change="computeZpzXy95mm(3)"
                                      @keydown.native="handleKeyDown($event, 8, 0)"
                                      @paste.native="handlePaste($event, 8, 0)"
                                      :ref="'8_0'"/>
                        </td>
                        <td width="20%" colspan="2">
                            <el-input :type="isPdf ? 'string' : 'number'" tabindex="200"
                                      v-model="form.zhenpzklhlljxy95syzpzklzlItem3"
                                      @change="computeZpzXy95mm(3)"
                                      @keydown.native="handleKeyDown($event, 8, 1)"
                                      @paste.native="handlePaste($event, 8, 1)"
                                      :ref="'8_1'"/>
                        </td>
                        <td width="20%" colspan="2">
                            <div>{{ this.form.zhenpzklhlljxy95syzpzklhlItem3 }}</div>
                        </td>
                    </tr>
                    <tr>
                        <td width="5%" rowspan="11">
                            <div>粗集料与沥青黏附性</div>
                        </td>
                        <td width="5%">
                            <div>序号</div>
                        </td>
                        <td width="5%">
                            <div>试验方法</div>
                        </td>
                        <td width="60%" colspan="6">
                            <div>表面沥青剥落情况</div>
                        </td>
                        <td width="10%">
                            <div>黏附性等级</div>
                        </td>
                        <td width="15%">
                            <div>平均等级</div>
                        </td>
                    </tr>
                    <tr v-for="(item, index) in form.detailList">
                        <td width="5%">
                            <div>{{ item.cjllqnfxsyxh }}</div>
                        </td>
                        <td width="5%" v-if="index == '0' || index == '5'" rowspan="5">
                            <el-input type="text" tabindex="200"
                                      v-model="item.cjllqnfxsyff"
                                      @keydown.native="handleKeyDown($event, 9 + index, 0)"
                                      :ref="`${Number(9 + index)}_0`"/>
                        </td>
                        <td width="60%" colspan="6">
                            <el-input type="text" tabindex="200"
                                      v-model="item.cjllqnfxsybmblqk"
                                      @keydown.native="handleKeyDown($event, 9 + index, 1)"
                                      @paste.native="handlePasteDetailList($event,  index, 0)"
                                      :ref="`${Number(9 + index)}_1`"/>
                        </td>
                        <td width="10%">
                            <el-input :type="isPdf ? 'string' : 'number'" tabindex="200"
                                      v-model="item.cjllqnfxsynfxdj"
                                      @change="computeDetailList()"
                                      @keydown.native="handleKeyDown($event, 9 + index, 2)"
                                      @paste.native="handlePasteDetailList($event,  index, 1)"
                                      :ref="`${Number(9 + index)}_2`"/>
                        </td>
                        <td width="10%" v-if="index == '0'" rowspan="10">
                            <div>{{ item.cjllqnfxsydjPjz }}</div>
                        </td>
                    </tr>
                    <tr>
                        <td width="10%" rowspan="3">
                            <div>水洗法&lt;0.075mm颗粒含量</div>
                        </td>
                        <td width="10%">
                            <div>试验编号</div>
                        </td>
                        <td width="20%" colspan="3">
                            <div>试验前烘干试样质量(g)</div>
                        </td>
                        <td width="20%" colspan="2">
                            <div>试验后烘干试样质量(g)</div>
                        </td>
                        <td width="20%" colspan="2">
                            <div>水洗法&lt;0.075mm颗粒含量(%)</div>
                        </td>
                        <td width="20%" colspan="2">
                            <div>平均值(%)</div>
                        </td>
                    </tr>
                    <tr>
                        <td width="10%">
                            <div>{{ this.form.shuixfxy075klhlsybhItem1 }}</div>
                        </td>
                        <td width="20%" colspan="3">
                            <el-input :type="isPdf ? 'string' : 'number'" tabindex="200"
                                      v-model="form.shuixfxy075klhlsyqhgsyzlItem1"
                                      @change="computeSxXy075mm(1)"
                                      @keydown.native="handleKeyDown($event, 19, 0)"
                                      @paste.native="handlePasteTwo($event, 0, 0)"
                                      :ref="'19_0'"/>
                        </td>
                        <td width="20%" colspan="2">
                            <el-input :type="isPdf ? 'string' : 'number'" tabindex="200"
                                      v-model="form.shuixfxy075klhlsyhhgsyzlItem1"
                                      @change="computeSxXy075mm(1)"
                                      @keydown.native="handleKeyDown($event, 19, 1)"
                                      @paste.native="handlePasteTwo($event, 0, 1)"
                                      :ref="'19_1'"/>
                        </td>
                        <td width="20%" colspan="2">
                            <div>{{ this.form.shuixfxy075klhlItem1 }}</div>
                        </td>
                        <td width="20%" colspan="2" rowspan="2">
                            <div>{{ this.form.shuixfxy075klhlsyPjz }}</div>
                        </td>
                    </tr>
                    <tr>
                        <td width="10%">
                            <div>{{ this.form.shuixfxy075klhlsybhItem2 }}</div>
                        </td>
                        <td width="20%" colspan="3">
                            <el-input :type="isPdf ? 'string' : 'number'" tabindex="200"
                                      v-model="form.shuixfxy075klhlsyqhgsyzlItem2"
                                      @change="computeSxXy075mm(2)"
                                      @keydown.native="handleKeyDown($event, 20, 0)"
                                      @paste.native="handlePasteTwo($event, 1, 0)"
                                      :ref="'20_0'"/>
                        </td>
                        <td width="20%" colspan="2">
                            <el-input :type="isPdf ? 'string' : 'number'" tabindex="200"
                                      v-model="form.shuixfxy075klhlsyhhgsyzlItem2"
                                      @change="computeSxXy075mm(2)"
                                      @keydown.native="handleKeyDown($event, 20, 1)"
                                      @paste.native="handlePasteTwo($event, 1, 1)"
                                      :ref="'20_1'"/>
                        </td>
                        <td width="20%" colspan="2">
                            <div>{{ this.form.shuixfxy075klhlItem2 }}</div>
                        </td>
                    </tr>
                    </tbody>
                </table>
                <!-- .....................................................33333333333333333................................................... -->
                <table height="60px" class="bottom-table">
                    <tr>
                        <td>
                            <span v-if="isPdf" class="textarea-span">{{ form.fujsm }}</span>
                            <el-input v-else type="textarea" :rows="2" v-model="form.fujsm"
                                      @focus="handleFocus('fujsm')"/>
                        </td>
                    </tr>
                </table>
            </div>
            <!-- .................................44444444444............................................. -->
            <table height="22px" class="transparent">
                <tbody>
                <tr>
                    <td width="10%" align="right">检测：</td>
                    <td width="15%" align="left">
                        <!-- {{this.form.jiancr}} -->
                    </td>
                    <td width="10%" align="right">记录：</td>
                    <td width="15%" align="left">
                        <!-- {{this.form.jilr}} -->
                    </td>
                    <td width="10%" align="right">复核：</td>
                    <td align="left" width="15%">
                        <!-- {{this.form.fuhr}} -->
                    </td>
                    <td width="10%">日期：</td>
                    <td align="left" width="15%">
                        <div style="display: inline-block; margin-right: 30px;">年</div>
                        <div style="display: inline-block; margin-right: 30px;">月</div>
                        <div style="display: inline-block;">日</div>
                    </td>
                </tr>
                </tbody>
            </table>
        </div>
        <bs-instrument-view ref="bsInstrumentViewRef" @select="selectInstrument"></bs-instrument-view>
        <bs-jiancyj-view ref="bsJiancyjViewRef" @select="selectJiancyj" :syType="syType"></bs-jiancyj-view>
        <bs-judge-base-view ref="bsJudgeBaseViewRef" @select="selectJudge" :syType="syType"></bs-judge-base-view>
    </div>
</template>

<script>
import {handleFocus, emptyConvert, uniqueStr, handleKeyDown, handlePaste} from "@/views/reportForms/utils";
import {getCjlzpznfxjlbBsInfo} from "@/api/report_jl/cjl";
import BsInstrumentView from "@/views/dept/bsInstrument/BsInstrumentView";
import BsJiancyjView from "@/views/sycs/bsJiancyj/BsJiancyjView";
import BsJudgeBaseView from "@/views/sycs/bsJudgeBase/BsJudgeBaseView.vue";

import decimal from "@/utils/big-decimal";
import Bus from "@/utils/bus";

export default {
    name: "cjlzpznfxjlbTable",
    components: {
        BsInstrumentView,
        BsJiancyjView,
        BsJudgeBaseView
    },
    props: {
        excelId: {
            type: [String, Number],
            default: () => ""
        },
        syType: {
            type: [String, Number],
            default: () => ""
        },
        page: {
            type: Number,
            default: () => 0
        },
        isPdf: {
            type: Boolean,
            default: () => false
        },
        printEmpty: {
            type: Boolean,
            default: () => false
        }
    },
    data() {
        return {
            form: {
                detailList: [],
                baobbhList: []
            },
            show: false,
            showQyxx: true,
            backBgz: {},
            aSum: null,
            bSum: null,
            a1Sum: null,
            b1Sum: null
        };
    },
    computed: {},
    created() {
        this.init();
    },
    watch: {
        isPdf(newVal, oldVal) {
            this.form = {...emptyConvert(this.form, newVal)};
        },
        backBgz: {
            deep: true,
            handler(newVal, oldVal) {
                this.backBgzFun();
            }
        }
    },
    methods: {
        // 根据报表id获取当前报表信息
        init() {
            this.show = false;
            getCjlzpznfxjlbBsInfo(this.excelId || this.$defaultExcelId).then((response) => {
                this.form = response.data;
                this.setInitialValue();
                this.show = true;
            });
        },
        // 设置初始值
        setInitialValue() {
            if (this.form) {
                this.form.baobmc = this.form.baobmc || "粗集料针片状颗粒含量、黏附性、0.075mm以下颗粒含量试验检测记录表";
                this.form.baobbh = this.form.baobmc || "JGLQ02007b,JGLQ02017,JGLQ10009";
                this.$set(this.form, "baobbhList", []);
                this.form.baobbhList = ["JGLQ02007b", "JGLQ02017", "JGLQ10009"];
                this.form.zhenpzklhlhhlsycsItem1 = this.form.zhenpzklhlhhlsycsItem1 || "1";
                this.form.zhenpzklhlhhlsycsItem2 = this.form.zhenpzklhlhhlsycsItem2 || "2";
                this.form.zhenpzklhlhhlsycsItem3 = this.form.zhenpzklhlhhlsycsItem3 || "3";
                this.form.zhenpzklhlljdy95sycsItem1 = this.form.zhenpzklhlljdy95sycsItem1 || "1";
                this.form.zhenpzklhlljdy95sycsItem2 = this.form.zhenpzklhlljdy95sycsItem2 || "2";
                this.form.zhenpzklhlljdy95sycsItem3 = this.form.zhenpzklhlljdy95sycsItem3 || "3";
                this.form.zhenpzklhlljxy95sycsItem1 = this.form.zhenpzklhlljxy95sycsItem1 || "1";
                this.form.zhenpzklhlljxy95sycsItem2 = this.form.zhenpzklhlljxy95sycsItem2 || "2";
                this.form.zhenpzklhlljxy95sycsItem3 = this.form.zhenpzklhlljxy95sycsItem3 || "3";
                this.form.shuixfxy075klhlsybhItem1 = this.form.shuixfxy075klhlsybhItem1 || "1";
                this.form.shuixfxy075klhlsybhItem2 = this.form.shuixfxy075klhlsybhItem2 || "2";
                if (!this.form.fujsm) {
                    this.form.fujsm = "附加声明：";
                }
                if (!this.form.detailList || this.form.detailList.length <= 0) {
                    this.getDetailList();
                }
            }
        },
        getDetailList() {
            this.$set(this.form, "detailList", []);
            const detail11 = {
                detailId: null,
                excelId: this.excelId,
                cjllqnfxsyfz: "1",
                cjllqnfxsyxh: "1",
                cjllqnfxsyff: null,
                cjllqnfxsybmblqk: null,
                cjllqnfxsynfxdj: null,
                cjllqnfxsydjPjz: null
            };
            const detail12 = {
                detailId: null,
                excelId: this.excelId,
                cjllqnfxsyfz: "1",
                cjllqnfxsyxh: "2",
                cjllqnfxsyff: null,
                cjllqnfxsybmblqk: null,
                cjllqnfxsynfxdj: null,
                cjllqnfxsydjPjz: null
            };
            const detail13 = {
                detailId: null,
                excelId: this.excelId,
                cjllqnfxsyfz: "1",
                cjllqnfxsyxh: "3",
                cjllqnfxsyff: null,
                cjllqnfxsybmblqk: null,
                cjllqnfxsynfxdj: null,
                cjllqnfxsydjPjz: null
            };
            const detail14 = {
                detailId: null,
                excelId: this.excelId,
                cjllqnfxsyfz: "1",
                cjllqnfxsyxh: "4",
                cjllqnfxsyff: null,
                cjllqnfxsybmblqk: null,
                cjllqnfxsynfxdj: null,
                cjllqnfxsydjPjz: null
            };
            const detail15 = {
                detailId: null,
                excelId: this.excelId,
                cjllqnfxsyfz: "1",
                cjllqnfxsyxh: "5",
                cjllqnfxsyff: null,
                cjllqnfxsybmblqk: null,
                cjllqnfxsynfxdj: null,
                cjllqnfxsydjPjz: null
            };
            const detail21 = {
                detailId: null,
                excelId: this.excelId,
                cjllqnfxsyfz: "2",
                cjllqnfxsyxh: "1",
                cjllqnfxsyff: null,
                cjllqnfxsybmblqk: null,
                cjllqnfxsynfxdj: null,
                cjllqnfxsydjPjz: null
            };
            const detail22 = {
                detailId: null,
                excelId: this.excelId,
                cjllqnfxsyfz: "2",
                cjllqnfxsyxh: "2",
                cjllqnfxsyff: null,
                cjllqnfxsybmblqk: null,
                cjllqnfxsynfxdj: null,
                cjllqnfxsydjPjz: null
            };
            const detail23 = {
                detailId: null,
                excelId: this.excelId,
                cjllqnfxsyfz: "2",
                cjllqnfxsyxh: "3",
                cjllqnfxsyff: null,
                cjllqnfxsybmblqk: null,
                cjllqnfxsynfxdj: null,
                cjllqnfxsydjPjz: null
            };
            const detail24 = {
                detailId: null,
                excelId: this.excelId,
                cjllqnfxsyfz: "2",
                cjllqnfxsyxh: "4",
                cjllqnfxsyff: null,
                cjllqnfxsybmblqk: null,
                cjllqnfxsynfxdj: null,
                cjllqnfxsydjPjz: null
            };
            const detail25 = {
                detailId: null,
                excelId: this.excelId,
                cjllqnfxsyfz: "2",
                cjllqnfxsyxh: "5",
                cjllqnfxsyff: null,
                cjllqnfxsybmblqk: null,
                cjllqnfxsynfxdj: null,
                cjllqnfxsydjPjz: null
            };
            this.form.detailList.push(detail11);
            this.form.detailList.push(detail12);
            this.form.detailList.push(detail13);
            this.form.detailList.push(detail14);
            this.form.detailList.push(detail15);
            this.form.detailList.push(detail21);
            this.form.detailList.push(detail22);
            this.form.detailList.push(detail23);
            this.form.detailList.push(detail24);
            this.form.detailList.push(detail25);
        },
        // 显示仪器列表
        showBsInstrumentView() {
            this.$refs.bsInstrumentViewRef.init(this.form.shebIds);
        },
        // 仪器选择
        selectInstrument(info) {
            this.form.zhuyyqsbmcjbh = info.label;
            this.form.shebIds = info.ids;
            Bus.$emit("setCjlBgZhuyyqsbmcjbh", {zhuyyqsbmcjbh: this.form.zhuyyqsbmcjbh, shebIds: this.form.shebIds});
        },
        // 显示检测依据列表
        showBsJiancyjView() {
            this.$refs.bsJiancyjViewRef.init(this.form.jiancyjIds);
        },
        // 检测依据选择
        selectJiancyj(info) {
            this.form.jiancyj = info.label;
            this.form.jiancyjIds = info.ids;
            Bus.$emit("setCjlBgJiancyj", {jiancyj: this.form.jiancyj, jiancyjIds: this.form.jiancyjIds});
        },
        // 显示判定依据列表
        showBsJudgeBaseView() {
            this.$refs.bsJudgeBaseViewRef.init(this.form.pandyjIds);
        },
        // 判断依据选择
        selectJudge(info) {
            if (!this.form.pandyj) {
                this.form.pandyj = info.label;
                return;
            }
            if (info && info.label) {
                this.form.pandyj += "、" + info.label;
            }
        },
        // 返回报告引入值
        backBgzFun() {
            // this.$emit("backBgzFun", this.backBgz);
            Bus.$emit("setCjlBgJiancjg", [
                {key: 160, value: this.form.zhenpzklhlhhlsyPjz},
                {key: 161, value: this.form.zhenpzklhlljxy95syzpzklhlPjz},
                {key: 162, value: this.form.zhenpzklhlljdy95syPjz},
                {key: 37, value: this.form.shuixfxy075klhlsyPjz},
                {key: 38, value: this.form.detailList[0].cjllqnfxsydjPjz}
            ]);
        },
        submitForm() {
            return this.form;
        },
        handleFocus(event) {
            handleFocus(event, this.page, this.form[event]);
        },
        // 混合料平均值
        computeZpzHhlPjz() {
            if (this.form.zhenpzklhlhhlsyzpzklhlItem1 && this.form.zhenpzklhlhhlsyzpzklhlItem2 && !this.form.zhenpzklhlhhlsyzpzklhlItem3) {
                const c = decimal.add(this.form.zhenpzklhlhhlsyzpzklhlItem1 || 0, this.form.zhenpzklhlhhlsyzpzklhlItem2 || 0);
                const e = decimal.divide(c, 2, 1);
                this.form.zhenpzklhlhhlsyPjz = e;
            } else if (this.form.zhenpzklhlhhlsyzpzklhlItem1 && this.form.zhenpzklhlhhlsyzpzklhlItem2 && this.form.zhenpzklhlhhlsyzpzklhlItem3) {
                const c = decimal.add(this.form.zhenpzklhlhhlsyzpzklhlItem1 || 0, this.form.zhenpzklhlhhlsyzpzklhlItem2 || 0);
                const d = decimal.add(c, this.form.zhenpzklhlhhlsyzpzklhlItem3 || 0);
                const e = decimal.divide(d, 3, 1);
                this.form.zhenpzklhlhhlsyPjz = e;
            } else {
                this.form.zhenpzklhlhhlsyPjz = null;
            }
            this.$set(this.backBgz, "zhenpzklhlhhlsyPjz", this.form.zhenpzklhlhhlsyPjz);
        },
        // 混合料1
        computeZpzHhl(index) {
            const zhenpzklhlhhlsyzpzklzlItem = this.form["zhenpzklhlhhlsyzpzklzlItem" + index];
            const zhenpzklhlhhlsyyjlzlItem = this.form["zhenpzklhlhhlsyyjlzlItem" + index];
            if (zhenpzklhlhhlsyzpzklzlItem && zhenpzklhlhhlsyyjlzlItem && zhenpzklhlhhlsyyjlzlItem != 0) {
                const a = decimal.multiply(zhenpzklhlhhlsyzpzklzlItem, 100, 1);
                const b = decimal.divide(a, zhenpzklhlhhlsyyjlzlItem, 1);
                this.form["zhenpzklhlhhlsyzpzklhlItem" + index] = b;
            } else {
                this.form["zhenpzklhlhhlsyzpzklhlItem" + index] = null;
            }
            this.computeZpzHhlPjz();
        },
        // 粒径大于9.5mm1平均值
        computeZpzDy95mmPjz() {
            if (this.form.zhenpzklhlljdy95syzpzklhlItem1 && this.form.zhenpzklhlljdy95syzpzklhlItem2 && !this.form.zhenpzklhlljdy95syzpzklhlItem3) {
                const c = decimal.add(this.form.zhenpzklhlljdy95syzpzklhlItem1 || 0, this.form.zhenpzklhlljdy95syzpzklhlItem2 || 0);
                const e = decimal.divide(c, 2, 1);
                this.form.zhenpzklhlljdy95syPjz = e;
            } else if (this.form.zhenpzklhlljdy95syzpzklhlItem1 && this.form.zhenpzklhlljdy95syzpzklhlItem2 && this.form.zhenpzklhlljdy95syzpzklhlItem3) {
                const c = decimal.add(this.form.zhenpzklhlljdy95syzpzklhlItem1 || 0, this.form.zhenpzklhlljdy95syzpzklhlItem2 || 0);
                const d = decimal.add(c, this.form.zhenpzklhlljdy95syzpzklhlItem3 || 0);
                const e = decimal.divide(d, 3, 1);
                this.form.zhenpzklhlljdy95syPjz = e;
            } else {
                this.form.zhenpzklhlljdy95syPjz = null;
            }
            this.$set(this.backBgz, "zhenpzklhlljdy95syPjz", this.form.zhenpzklhlljdy95syPjz);
        },
        // 粒径大于9.5mm1
        computeZpzDy95mm(index) {
            const zhenpzklhlljdy95syzpzklzlItem = this.form["zhenpzklhlljdy95syzpzklzlItem" + index];
            const zhenpzklhlljdy95syyjlzlItem = this.form["zhenpzklhlljdy95syyjlzlItem" + index];
            if (zhenpzklhlljdy95syzpzklzlItem && zhenpzklhlljdy95syyjlzlItem && zhenpzklhlljdy95syyjlzlItem != 0) {
                const a = decimal.multiply(zhenpzklhlljdy95syzpzklzlItem, 100, 1);
                const b = decimal.divide(a, zhenpzklhlljdy95syyjlzlItem, 1);
                this.form["zhenpzklhlljdy95syzpzklhlItem" + index] = b;
            } else {
                this.form["zhenpzklhlljdy95syzpzklhlItem" + index] = null;
            }
            this.computeZpzDy95mmPjz();
        },
        // 粒径小于9.5mm1平均值
        computeZpzXy95mmPjz() {
            if (this.form.zhenpzklhlljxy95syzpzklhlItem1 && this.form.zhenpzklhlljxy95syzpzklhlItem2 && !this.form.zhenpzklhlljxy95syzpzklhlItem3) {
                const c = decimal.add(this.form.zhenpzklhlljxy95syzpzklhlItem1 || 0, this.form.zhenpzklhlljxy95syzpzklhlItem2 || 0);
                const e = decimal.divide(c, 2, 1);
                this.form.zhenpzklhlljxy95syzpzklhlPjz = e;
            } else if (this.form.zhenpzklhlljxy95syzpzklhlItem1 && this.form.zhenpzklhlljxy95syzpzklhlItem2 && this.form.zhenpzklhlljxy95syzpzklhlItem3) {
                const c = decimal.add(this.form.zhenpzklhlljxy95syzpzklhlItem1 || 0, this.form.zhenpzklhlljxy95syzpzklhlItem2 || 0);
                const d = decimal.add(c, this.form.zhenpzklhlljxy95syzpzklhlItem3 || 0);
                const e = decimal.divide(d, 3, 1);
                this.form.zhenpzklhlljxy95syzpzklhlPjz = e;
            } else {
                this.form.zhenpzklhlljxy95syzpzklhlPjz = null;
            }
            this.$set(this.backBgz, "zhenpzklhlljxy95syzpzklhlPjz", this.form.zhenpzklhlljxy95syzpzklhlPjz);
        },
        // 粒径小于9.5mm1
        computeZpzXy95mm(index) {
            const zhenpzklhlljxy95syzpzklzlItem = this.form["zhenpzklhlljxy95syzpzklzlItem" + index];
            const zhenpzklhlljxy95syyjlzlItem = this.form["zhenpzklhlljxy95syyjlzlItem" + index];
            if (zhenpzklhlljxy95syzpzklzlItem && zhenpzklhlljxy95syyjlzlItem && zhenpzklhlljxy95syyjlzlItem != 0) {
                const a = decimal.multiply(zhenpzklhlljxy95syzpzklzlItem, 100, 1);
                const b = decimal.divide(a, zhenpzklhlljxy95syyjlzlItem, 1);
                this.form["zhenpzklhlljxy95syzpzklhlItem" + index] = b;
            } else {
                this.form["zhenpzklhlljxy95syzpzklhlItem" + index] = null;
            }
            this.computeZpzXy95mmPjz();
        },
        // 水洗法<0.075mm1平均值
        computeSxXy075mmPjz() {
            if (this.form.shuixfxy075klhlItem1 && this.form.shuixfxy075klhlItem2) {
                const d = decimal.add(this.form.shuixfxy075klhlItem1 || 0, this.form.shuixfxy075klhlItem2 || 0);
                const e = decimal.divide(d, 2, 1);
                this.form.shuixfxy075klhlsyPjz = e;
            } else {
                this.form.shuixfxy075klhlsyPjz = null;
            }
            this.$set(this.backBgz, "shuixfxy075klhlsyPjz", this.form.shuixfxy075klhlsyPjz);
        },
        // 水洗法<0.075mm1
        computeSxXy075mm(index) {
            const shuixfxy075klhlsyhhgsyzlItem = this.form["shuixfxy075klhlsyhhgsyzlItem" + index];
            const shuixfxy075klhlsyqhgsyzlItem = this.form["shuixfxy075klhlsyqhgsyzlItem" + index];
            if (shuixfxy075klhlsyhhgsyzlItem && shuixfxy075klhlsyqhgsyzlItem && shuixfxy075klhlsyqhgsyzlItem != 0) {
                const a = decimal.subtract(shuixfxy075klhlsyqhgsyzlItem || 0, shuixfxy075klhlsyhhgsyzlItem || 0, 1);
                const b = decimal.multiply(a, 100, 1);
                const c = decimal.divide(b, shuixfxy075klhlsyqhgsyzlItem, 1);
                this.form["shuixfxy075klhlItem" + index] = c;
            } else {
                this.form["shuixfxy075klhlItem" + index] = null;
            }
            this.computeSxXy075mmPjz();
        },
        // 子表计算
        computeDetailList() {
            let a1Sum = 0;
            let aSum = null;
            for (let i = 0; i < this.form.detailList.length; i++) {
                if (this.form.detailList[i].cjllqnfxsynfxdj) {
                    aSum = decimal.add(aSum || 0, this.form.detailList[i].cjllqnfxsynfxdj);
                    a1Sum++;
                }
            }

            let m = 0;
            for (let i = 0; i < this.form.detailList.length; i++) {
                if (a1Sum != 0 && aSum) {
                    m = decimal.divide(aSum, a1Sum, 0);
                    this.form.detailList[i].cjllqnfxsydjPjz = m;
                }
            }
            this.$set(this.backBgz, "cjllqnfxsydjPjz", m);

            if (a1Sum == 0 || !aSum) {
                for (let i = 0; i < this.form.detailList.length; i++) {
                    this.form.detailList[i].cjllqnfxsydjPjz = null;
                }
            }
            if (this.form.detailList[0] && this.form.detailList[0].cjllqnfxsyff) {
                this.form.detailList[1].cjllqnfxsyff = this.form.detailList[0].cjllqnfxsyff;
                this.form.detailList[2].cjllqnfxsyff = this.form.detailList[0].cjllqnfxsyff;
                this.form.detailList[3].cjllqnfxsyff = this.form.detailList[0].cjllqnfxsyff;
                this.form.detailList[4].cjllqnfxsyff = this.form.detailList[0].cjllqnfxsyff;
            }
            if (this.form.detailList[5] && this.form.detailList[5].cjllqnfxsyff) {
                this.form.detailList[6].cjllqnfxsyff = this.form.detailList[5].cjllqnfxsyff;
                this.form.detailList[7].cjllqnfxsyff = this.form.detailList[5].cjllqnfxsyff;
                this.form.detailList[8].cjllqnfxsyff = this.form.detailList[5].cjllqnfxsyff;
                this.form.detailList[9].cjllqnfxsyff = this.form.detailList[5].cjllqnfxsyff;
            }
        },
        sumA() {
            if (this.form.detailList && this.form.detailList.length > 0) {
            }
        },
        handleKeyDown(event, rowIndex, colIndex) {
            const maxArr = [1, 1, 1, 1, 1, 1, 1, 1, 1,
                2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
                1, 1];
            const refKey = handleKeyDown(event, rowIndex, colIndex, maxArr);
            // 通过_拆分字符串
            const arr = refKey.split("_");
            if (arr[0] >= 9 && arr[0] < 19) {
                if ((arr[0] != 9 && arr[0] != 14) && arr[1] == 0) {
                    this.handleKeyDown(event, arr[0], arr[1]);
                    return;
                }
                ;
                if (this.$refs[refKey][0]) {
                    this.$refs[refKey][0].focus();
                }
            } else {
                if (this.$refs[refKey]) {
                    this.$refs[refKey].focus();
                }
            }
        },
        // 粘贴赋值方法
        handlePaste(event, rowIndex, colIndex) {
            const nameAllArr = [
                ["zhenpzklhlhhlsyyjlzlItem1", "zhenpzklhlhhlsyzpzklzlItem1"],
                ["zhenpzklhlhhlsyyjlzlItem2", "zhenpzklhlhhlsyzpzklzlItem2"],
                ["zhenpzklhlhhlsyyjlzlItem3", "zhenpzklhlhhlsyzpzklzlItem3"],

                ["zhenpzklhlljdy95syyjlzlItem1", "zhenpzklhlljdy95syzpzklzlItem1"],
                ["zhenpzklhlljdy95syyjlzlItem2", "zhenpzklhlljdy95syzpzklzlItem2"],
                ["zhenpzklhlljdy95syyjlzlItem3", "zhenpzklhlljdy95syzpzklzlItem3"],

                ["zhenpzklhlljxy95syyjlzlItem1", "zhenpzklhlljxy95syzpzklzlItem1"],
                ["zhenpzklhlljxy95syyjlzlItem2", "zhenpzklhlljxy95syzpzklzlItem2"],
                ["zhenpzklhlljxy95syyjlzlItem3", "zhenpzklhlljxy95syzpzklzlItem3"],

            ];
            const subscriptArr = [
                [0, 1],
                [0, 1],
                [0, 1],

                [0, 1],
                [0, 1],
                [0, 1],

                [0, 1],
                [0, 1],
                [0, 1],
            ];

            const methodsAllArr = [
                ["computeZpzHhl", "computeZpzHhl"],
                ["computeZpzHhl", "computeZpzHhl"],
                ["computeZpzHhl", "computeZpzHhl"],

                ["computeZpzDy95mm", "computeZpzDy95mm"],
                ["computeZpzDy95mm", "computeZpzDy95mm"],
                ["computeZpzDy95mm", "computeZpzDy95mm"],

                ["computeZpzXy95mm", "computeZpzXy95mm"],
                ["computeZpzXy95mm", "computeZpzXy95mm"],
                ["computeZpzXy95mm", "computeZpzXy95mm"],
            ];
            const parameterArr = [
                [1, 1],
                [2, 2],
                [3, 3],

                [1, 1],
                [2, 2],
                [3, 3],

                [1, 1],
                [2, 2],
                [3, 3],
            ];
            const data = handlePaste(event, rowIndex, colIndex, nameAllArr, methodsAllArr, parameterArr, subscriptArr);
            const {cols, nameSetArr, methodsSetArr, parameterSetArr, subscriptSetArr} = data;
            for (let a = 0; a < nameSetArr.length; a++) {
                for (let b = 0; b < nameSetArr[a].length; b++) {
                    this.form[nameSetArr[a][b]] = cols[a][b];
                }
            }
            for (let a = 0; a < methodsSetArr.length; a++) {
                for (let b = 0; b < methodsSetArr[a].length; b++) {
                    // if (methodsSetArr[a][b] == "calculateShitzl") {
                    // console.log(methodsSetArr[a][b], subscriptArr[a][b]);

                    this.setCalculate(methodsSetArr[a][b], parameterSetArr[a][b]);
                    // } else {
                    // this.setCalculate(methodsSetArr[a][b], parameterSetArr[a][b][0], parameterSetArr[a][b][1]);
                    // }
                }
            }
        },

        // detailList粘贴赋值方法
        handlePasteDetailList(event, rowIndex, colIndex) {
            const nameAllArr = this.form.detailList.map((item, index) => {
                return ["cjllqnfxsybmblqk", "cjllqnfxsynfxdj"]
            });
            const subscriptArr = this.form.detailList.map((item, index) => {
                return [0, 1]
            });
            const methodsAllArr = this.form.detailList.map((item, index) => {
                return [null, "computeDetailList"]
            });
            const parameterArr = this.form.detailList.map((item, index) => {
                return [null, null]
            });

            const data = handlePaste(event, rowIndex, colIndex, nameAllArr, methodsAllArr, parameterArr, subscriptArr);
            const {cols, nameSetArr, methodsSetArr, parameterSetArr, subscriptSetArr} = data;
            for (let a = 0; a < nameSetArr.length; a++) {
                for (let b = 0; b < nameSetArr[a].length; b++) {
                    this.form.detailList[rowIndex + a][nameSetArr[a][b]] = cols[a][b];
                }
            }
            console.log(methodsSetArr)
            for (let a = 0; a < methodsSetArr.length; a++) {
                for (let b = 0; b < methodsSetArr[a].length; b++) {
                   if (methodsSetArr[a][b]){
                       this.setCalculate(methodsSetArr[a][b], parameterSetArr[a][b]);
                   }
                }
            }
        },

        // 粘贴赋值方法
        handlePasteTwo(event, rowIndex, colIndex) {
            const nameAllArr = [
                ["shuixfxy075klhlsyqhgsyzlItem1", "shuixfxy075klhlsyhhgsyzlItem1"],
                ["shuixfxy075klhlsyqhgsyzlItem2", "shuixfxy075klhlsyhhgsyzlItem2"],
            ];
            const subscriptArr = [
                [0, 1],
                [0, 1],
            ];

            const methodsAllArr = [
                ["computeSxXy075mm", "computeSxXy075mm"],
                ["computeSxXy075mm", "computeSxXy075mm"],
            ];
            const parameterArr = [
                [1, 1],
                [2, 2],
            ];
            const data = handlePaste(event, rowIndex, colIndex, nameAllArr, methodsAllArr, parameterArr, subscriptArr);
            const {cols, nameSetArr, methodsSetArr, parameterSetArr, subscriptSetArr} = data;
            for (let a = 0; a < nameSetArr.length; a++) {
                for (let b = 0; b < nameSetArr[a].length; b++) {
                    this.form[nameSetArr[a][b]] = cols[a][b];
                }
            }
            for (let a = 0; a < methodsSetArr.length; a++) {
                for (let b = 0; b < methodsSetArr[a].length; b++) {
                    // if (methodsSetArr[a][b] == "calculateShitzl") {
                    // console.log(methodsSetArr[a][b], subscriptArr[a][b]);

                    this.setCalculate(methodsSetArr[a][b], parameterSetArr[a][b]);
                    // } else {
                    // this.setCalculate(methodsSetArr[a][b], parameterSetArr[a][b][0], parameterSetArr[a][b][1]);
                    // }
                }
            }
        },

        // 计算方法调用
        setCalculate(name, a, b, c, d, e) {
            this[name](a, b, c, d, e);
        }
    }
};
</script>

<style scoped lang="scss"></style>
